<?php 

$path = isset($_GET['q']) ? $_GET['q'] : '<front>';
$path_alias = drupal_get_path_alias($path);
$link = 'http://www.jessicahk.com/' . $path_alias;

$module_path = drupal_get_path('module', 'scmedia_fb_comment');

$uniq = uniqid();

if (user_is_logged_in()) {
  $_SESSION["scmedia_fb_comment_uniqid"] = $uniq;
}

?>
<script>
  var uniq = "<?php print $uniq; ?>";
</script>

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" data-href="<?php print $link;?>" data-numposts="5" data-colorscheme="light" data-order_by="reverse_time"></div>
